<template>
    <div>
      <mt-header :title="this.$route.name" fixed>
        <!--<div slot="left" v-if="!this.$route.meta.showleft&&(islogin=='false'||islogin==undefined)" @click='$router.push("/login")'  class="login" >-->
          <!--<span style="margin-left: 30px;">登录</span>-->
        <!--</div>-->
        <div v-if="this.$route.meta.showleft" @click='$router.go(-1)' slot="left">
          <mt-button icon="back"></mt-button>
        </div>
        <!--<div slot="right" class="caid " :class="[isActive? 'caiL':'caiM' ]"  @click="caidChild" size="large">-->
        <!--</div>-->
      </mt-header>

      <!--<mt-popup v-model="isActive"  popup-transition="popup-fade" class="mint-popup-4" position="top" style="width:100%;">-->
      <!--<transition name="fade">-->
        <!--<div v-if="isActive" class="modelM">-->
          <!--<div class="modelB">-->
            <!--<div v-for="item in modeMiss">-->
              <!--<div class="titelName">{{item.tetil}}</div>-->
              <!--<div class="aDIV">-->
                <!--<div v-for="items in item.list"  @click="modelToggle(items.http,item.islogn)">-->
                  <!--<span>{{items.txt}}</span>-->
                <!--</div>-->
              <!--</div>-->
            <!--</div>-->
            <!--<div class="hdbottom">-->
              <!--<div @click='$router.push("/")'>-->
                  <!--<span class="locaI"></span>-->
                  <!--<span>返回首页</span>-->
              <!--</div>-->
              <!--<div @click='modelToggle("/login")' v-if="islogin=='false'||islogin==undefined">-->
                  <!--<span class="locaL"></span>-->
                  <!--<span>登录</span>-->
              <!--</div>-->
              <!--<div @click='loginOut()' v-if="islogin!='false'&&islogin!=undefined">-->
                <!--<span class="locaL"></span>-->
                <!--<span>退出</span>-->
              <!--</div>-->
            <!--</div>-->
          <!--</div>-->
        <!--</div>-->
      <!--</transition>-->
      <!--</mt-popup>-->
    </div>
</template>
<script>
  import { Loadmore,Toast ,MessageBox } from 'mint-ui';
  export default {
    name: 'app',
    data() {
      return {
        islogin:sessionStorage.getItem('login'),
        setOut:sessionStorage.getItem('setTimeLogin'),
        isActive:false,
//        modeMiss:[{
//          tetil:'竞猜',
//          islogn:false,
//          list:[{
//              txt:'财经竞猜',
//              http:'/hot'
//          },{
//            txt:'足球竞猜',
//            http:'/soccer'
//          },{
//            txt:'篮球竞猜',
//            http:'/basketball'
//          },{
//            txt:'趣味竞猜',
//            http:'/funny'
//          }]
//        },{
//          tetil:'个人中心',
//          islogn:true,
//          list:[{
//            txt:'充值中心',
//            http:'/pay'
//          },{
//            txt:'奖品兑换',
//            http:'/prize'
//          },{
//            txt:'个人记录',
//            http:'/record'
//          },{
//            txt:'个人信息',
//            http:'/information'
//          }]
//        }]
      }
    },
    mounted(){
//       var _this=this;
//      if(this.setOut){
//          if(_this.islogin!='false'){
//            _this.$store.state.login=true;
//          }else {
//            _this.$store.state.login=false;
//          }
//        return false
//      }else if(!this.islogin||this.islogin==null){
//        this.$http(this.API.isLogin,{})
//          .then(function(res) {
//              sessionStorage.setItem('setTimeLogin', true);
//            _this.setOut=sessionStorage.getItem('setTimeLogin')
//            _this.$store.state.login=true;
//
//            if(res.flag!=-100){
//                sessionStorage.setItem('login', true)
//              _this.islogin=sessionStorage.getItem('login');
//              _this.$store.state.login=false;
//            }
//
//          }).catch(function(err) {
//            console.log(err);
//        });
//      }

    },
    methods: {
//      caidChild(){
//
//        this.isActive=!this.isActive;
//      },
//      modelToggle(to,no){
//          this.caidChild()
//          setTimeout(()=>{
//              if((this.islogin=='false'||this.islogin==undefined)&&no){
//                this.$router.push({path:'/login'})
//              }else{
//                this.$router.push({path:to})
//              }
//
//          },500)
//      },

    },
    components: {

    }

  };
</script>

<style>
  .fade-leave-active {
    animation: bounce-in-out .5s ease;
  }
  .fade-enter-active {
    animation: bounce-in-off .5s ease ;
  }
  @keyframes bounce-in-out {
    0% {
      transform: scale(1);
    }
    100% {
      transform: scale(0);
    }
  }
  @keyframes bounce-in-off {
    0% {
      transform: scale(0);
    }

    100% {
      transform: scale(1);
    }
  }

  a{
    text-decoration: none;
  }
  .mint-header{
    height: 45px  !important;
    line-height: 45px !important;
    background: #ea4848 !important;
    color: #fff !important;
  }
  .mint-header-title{
    margin: 0;
    font-size: 16px !important;
  }
  .login{
    height:40px;
    line-height: 40px;
    background-image: url(https://gss0.bdstatic.com/5eR1dDebRNRTm2_p8IuM_a/resource/jingcai-mobile/img/app-login.981d485.png);
    background-size: 28px;
    background-repeat: no-repeat;
    background-position: 0 6px;
  }
  .caid{
    width:40px;
    height:40px;
    float: right;
    background-size: 20px;
    background-repeat: no-repeat;
    background-position: 6px;
  }
  .caiM{
    background-image: url(https://gss0.bdstatic.com/5eR1dDebRNRTm2_p8IuM_a/resource/jingcai-mobile/img/app-menu.a8785f2.png);
  }
  .caiL{
    background-image: url(https://gss0.bdstatic.com/5eR1dDebRNRTm2_p8IuM_a/resource/jingcai-mobile/img/app-menu-close.1bc89e2.png);
  }
  .modelM{
    top:40px;
    left:0;
    right:0;
    bottom:0;
    position: fixed;
    width: 100%;
    background-color:rgba(30,37,62,0.8);
    z-index: 666;
  }
  .v-modal{
    /*/top:40px;*/
  }
  .modelB{
    padding: 15px 10px;

    background-color: #1b1f2e;
  }
  div.aDIV{
    text-align: left;

  }
  .titelName{
    color:#6b7fa7;
    font-size:14px;
    margin-bottom: 15px;
    text-align:left;
  }
  .aDIV>div{
    width:25%;
    display: inline-block;
    margin-bottom: 10px;
  }
  .aDIV>div:nth-child(4n+1){
    margin-left: 0;
  }
  .aDIV div>span,.modelB a{
    text-align: center;
    display: block;
    background: #344379;
    color: #c1ceff;
    font-size: 14px;
    margin:0 3px;
    line-height: 3;
  }
  .hdbottom{
    display: flex;
    margin-top: 20px;
  }
  .hdbottom>div{
    flex: 1;
    background: #344379;line-height: 3;color: #c1ceff;
  }
  .hdbottom>div{
    margin: 0;
  }
  .hdbottom>div:first-child{
    border-right: 1px solid  #253057;
  }
  .locaI,.locaL{
    display: inline-block;
    width: 18px;
    height: 22px;
    position: relative;
    top:5px;
    margin: -2px 5px 0 0;
    background-size: 18px;
    background-repeat: no-repeat;
    background-position: 0 2px;
  }
  .locaI{
    background-image: url(https://gss0.bdstatic.com/5eR1dDebRNRTm2_p8IuM_a/resource/jingcai-mobile/img/app-home.212e7f9.png);
  }
  .locaL{
    background-image: url(https://gss0.bdstatic.com/5eR1dDebRNRTm2_p8IuM_a/resource/jingcai-mobile/img/app-logout.7151bd1.png);
  }
</style>

